from twisted.internet import reactor
from twisted.web.server import Site
from twisted.web.resource import Resource

import time

class ClockPage(Resource):
    isLeaf = True
    def render_GET(self, request):
        return "The local time is: %s " % time.ctime()


resource = ClockPage()
factroy = Site(resource)
reactor.listenTCP(8000, factroy)
reactor.run()